KRenamingStrategy Class Reference

#include <krenamingstrategy.h>
Inheritance diagram for KRenamingStrategy:
Inheritance graph
[legend]

List of all members.


Detailed Description

This base class is an abstract implementation of a renaming strategy for avoiding name clashes.

An implementation of a reader (KFbxReader) or writer (KFbxWriter) class must call a concrete implementation of "KRenamingStrategy::Rename()" every time a name is imported or exported to avoid name clashes. Any class deriving from KRenamingStrategy must implement KRenamingStrategy::Clear(), KRenamingStrategy::Rename(), and KRenamingStrategy::Clone().

See also:
KName KNumberRenamingStrategy

Definition at line 56 of file krenamingstrategy.h.


Public Member Functions

  KRenamingStrategy ()
  Constructor.
virtual  ~KRenamingStrategy ()
  Destructor.
virtual void  Clear ()=0
  Resets internal state regarding assigned names.
virtual bool  Rename (KName &pName)=0
  Rename a name if necessary to avoid name-clash issues.
virtual KRenamingStrategy Clone ()=0
  Create a dynamic renaming strategy instance of the same type as the child class.

Constructor & Destructor Documentation

Constructor.

virtual ~KRenamingStrategy (  )  [virtual]

Destructor.


Member Function Documentation

virtual void Clear (  )  [pure virtual]

Resets internal state regarding assigned names.

Implemented in KNumberRenamingStrategy, and KFbxRenamingStrategy.

virtual bool Rename ( KName pName  )  [pure virtual]

Rename a name if necessary to avoid name-clash issues.

Parameters:
pName  The name to be renamed.
Returns:
Return true on success, false otherwise.

Implemented in KNumberRenamingStrategy, and KFbxRenamingStrategy.

virtual KRenamingStrategy* Clone (  )  [pure virtual]

Create a dynamic renaming strategy instance of the same type as the child class.

Returns:
New instance.

Implemented in KNumberRenamingStrategy, and KFbxRenamingStrategy.

KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy
KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy KRenamingStrategy